.section-title {

  @media only screen and (max-width: 480px) {
    padding: 85px 0 0;
  }

}

.country-overview-wrapper-coolio{
  position: relative;
  background: #333;
  margin-top: 36px;
  top: -20px;
  @media only screen and (max-width: 480px) {
    top: 0;
    margin-top: 0px;
  }
  .embed & {
    margin-top: 0;
    top: 0px;
  }
}

.overview_graph {
  width: 960px;
  margin: 0 auto;
  position: relative;

  @media only screen and (min-width: 481px) and (max-width: 1010px) {
    width: 100%;
  }
  .graph_tab, .all_countries {
    @media only screen and (min-width: 481px) and (max-width: 1010px) {
      width: 25%;
    }
  }

  .umdoptions_dialog {
    left: auto;
    right: 0px;
    top: 10px;
    display: block;
    position: absolute;
    width: 442px;
      &::after {
        top: -271px;
        left: 237px;
      }
      &::before {
        top: -28px;
        left: 237px;
      }
  }
}

.overview_graph__area {
  height: 371px;
  svg {
    border-top: 1px solid $dark;
    position: relative;
    z-index: 300;
  }
}
.overview_graph_source {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 310;
  color: $white;
  font-size: 12px;
  padding: 4px;
}

.tick {
  shape-rendering: optimizeSpeed;
  stroke-width: 1px;
  stroke-dasharray: 16, 2;
  background: red;
}

.grid_h {
  @extend .tick;
  stroke: rgba(#fff, .1);
}

.grid_v {
  @extend .tick;
  stroke: rgba(#fff, .3);
}

.linedot {
  stroke-width: 2px;
  stroke: #464253;
  fill: #fff;
  cursor: pointer;

  &.gain {
    stroke: #6D6DE5;
    &.extent {
      stroke: #97bd3d;
    }
  }
}

.overview_line {
  @extend .tick;
  stroke-width: 7px;
  stroke: #6D6DE5;
}

.minioverview_line {
  @extend .tick;
  stroke: #444;
  stroke-dasharray: 11px, 2px;
  @include opacity(.5);
}

.overview_graph__tabs {
  @extend .clearfix;

  li {
    display: table;
    float: left;
    background: lighten(#333, 2.5%);

    &.selected,
    &:hover {
      a {
        position: relative;
        border-bottom-color: transparent;
        color: rgba(#fff, .75);
        background: #333;
      }
    }

    &.selected a:after {
      content: '';
      position: absolute;
      top: 0; left: 50%;
      margin-left: -3px;
      border: 6px solid transparent;
      border-top-color: #eee;
    }

    &.all_countries a {
      background: #95BC3B;
      margin-bottom: 0;

      &:hover {
        background: darken(#95BC3B, 5%);
        border-bottom: 1px solid $dark;
      }
    }
  }
}

.overview_graph__link {
  display: table-cell;
  height: 99px;
  width: 240px;
  border-left: 1px solid $dark;
  border-bottom: 2px solid $dark;
  font-size: 14px;
  font-weight: 500;
  vertical-align: middle;
  text-align: center;
  text-transform: uppercase;
  color: rgba(#fff, .75);
  text-decoration: none;

  span {
    &:before { content: "— " }
    &:after { content: " —" }

    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: #A39FAA;
  }
}

.overview_graph__legend {
  width: 100%;
  margin-top: -1px;
  line-height: 40px;
  padding-left: 15px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  background: #333;
  color: #fff;
  position: relative;

  @media only screen and (max-width: 1010px) {
    text-align: left;
  }

  p {
    // border-left: 1px solid $dark;
    // border-left: 1px solid $dark;
  }

  .info {
    position: absolute;
    top: 50%;
    right: 20px;
    @include transform(translate(0,-50%));
    border-radius: 50%;
    background: $cGreen;
    width: 18px;
    height: 18px;
    border: 1px solid $cGreen;
    svg{
      width: 16px;
      height: 65%;
      fill: $white;
      position: absolute;
      top: 50%;
      left: 50%;
      @include transform(translate(-50%,-50%));
    }
  }
  .trigger-mode {
    background-color: #7b7b7b;
    color: #eee;
    width: 222px;
    height: 25px;
    font-size: 13px;
    text-transform: uppercase;
    position: absolute;
    @include display-flex();
    @include justify-content(space-between);
    right: 60px;
    top: 8px;
    border-radius: 50px;
    strong {
      background-color: #eee;
      color: #7b7b7b;
      border-radius: inherit;
    }
    span {
      cursor: pointer;
    }
    span,
    strong {
      width: 50%;
      @include display-flex();
      @include justify-content(center);
      @include align-items(center);
    }
    @media only screen and (max-width: 480px) {
      position: relative;
      margin: 10px auto;
      right: auto;
      top: auto;
    }
  }
}

.overview_graph__figure_only {
  display: none;
  width: 100%;
  text-align: center;
  padding: 50px;
  span {
    margin: 25px 0;
    color: #fff;
    font-size: 120px;
    .embed &{
      font-size: 80px;
    }
  }
  .unit {
    font-weight: 100;
  }
  .figure {
    color: #6D6DE5;
    &.extent {
      color: $cGreen;
    }
  }
  @media only screen and (max-width: 480px) {
    padding: 0 0 20px;
    span{
      font-size: 50px;
    }
  }

}

.overview_graph__years,
.overview_graph__axis,
.countries_list__header {
  position: relative;
  width: 100%;
  height: 28px;
  margin: 0 auto;
  border-bottom: 1px solid #CCC;
  line-height: 28px;
  font-size: 12px;
  font-weight: 500;
  color: #9D9AA5;
  text-align: right;

  span {
    text-transform: lowercase;
  }
  .loss-vs-gain {
    display: none !important;
    strong {
      color: #666;
      text-decoration: underline;
    }
    span {
      cursor: pointer;
      text-transform: none;
    }
  }
}
.overview_graph__years{
  width: 960px;
}

.overview_graph__axis {
  display: none;
  text-transform: none;
}

.year {
  display: block;
  position: absolute;
  width: 30px;
  margin-left: -15px;
  text-align: center;
}

.overview_graph__title {
  padding: 30px 0;
  font-size: 37px;
  line-height: 1.1;
  text-align: center;
  color: #463F52;
  vertical-align: top;
  margin: 0 auto;
  max-width: 700px;

  sup {
    position: relative;
    top: -14px;
    font-size: 23px;
    @media only screen and (min-width: 481px) and (max-width: 1010px) {
      display: block;
      top: 0;
    }
  }
}
.is-overview-action {
  .countries_list ul li {
    border-bottom: 1px solid #ccc;
    padding: 18px 0 18px 40px;
  }
}
.countries_list {
  margin:0 auto !important;
  width: 100%;

  @media only screen and (min-width: 481px) and (max-width: 1010px) {
    padding: 0 35px;
  }

  ul  {
    width: 100%;
  }
  li {
    position: relative;
    @extend .clearfix;
    &:hover {
      background: rgba(#ddd, .3);

      .bar {
        @include opacity(1);
      }

      .minioverview_line {
        @include opacity(0.7);
        stroke-width: 2px;
      }

      .countries_list__minioverview {

        .loss {
          color: #C443FF;
        }

        .gain {
          color: #6D6DE5;
        }
      }
    }
  }
}

.countries_list__header__minioverview,
.countries_list__minioverview {

  &.per-loss{
    width: auto;
    right: 171px;
  }
  &.total-loss{
    width: auto;
    right: 67px;
  }
  &.ratio-loss-gain{
    width: auto;
    right: 25px;
  }
  &.cover-extent{
    width: auto;
    right: 57px;
  }
  &.huge {
    width: 330px;
  }

  &.expanded {
    width: 170px;
  }

  &.medium {
    width: 150px;
  }
}

.countries_list__header__num,
.countries_list__num,
.countries_list__header__title,
.countries_list__title {
  float: left;
}

.countries_list__header__num,
.countries_list__num {
  width: 45px;
  padding: 0 10px;
}
.countries_list__data {
  position: absolute;
  top: 50%;
  right: 60px;
  @include transform-translate(0, -50%);
  float: right;
  width: 240px;
  text-align: right;
  margin-top: 4px;
  line-height: 20px;

  &.no-graph {
    width: auto;
    right: 0;
  }

  @media only screen and (min-width: 481px) and (max-width: 650px) {
    width: 190px;
    right: 0;
  }

  @media only screen and (max-width: 480px) {
    right: 25px;
  }

  .line {
    float: left;
    color: #A2A0A9;
    position: relative;
    box-sizing: content-box;
    min-width: 140px;
    padding: 0 10px 0 0;
    text-align: left;
    span{
      min-width: 50px;
      text-align: right;
      float: left;
      margin-right: 4px;
    }
    &.percent {
      margin-right: 20px;
      font-size: 1.3rem;
      margin-top: 13px;
    }
    // &::after {
    //   content: '';
    //   position: absolute;
    //   top: 50%;
    //   @include transform-translate(0, -50%);
    //   right: -11px;
    //   width: 6px;
    //   height: 6px;
    //   background-color: #FF6699;
    //   border-radius: 6px;
    // }
    &.percent::after {
      display: none;
    }
    &.gain::after {
      // right: -8px;
      background-color: #6D6DE5;
    }
  }
  div[id^="ext_"] {
    .line{
      float: right;
      &:after {
        display: none;
      }
    }

  }
  .perct {
    float: right;
  }
}
.countries_list__header__title,
.countries_list__title {
  padding-left: 15px;
}

.countries_list__num,
.countries_list__title {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 29px;
  line-height: 30px;
  font-weight: 300;
  color: #464152;
}

.countries_list__num {
  position: absolute;
  top: 50%;
  left: 0;
  @include transform-translate(0, -50%);
  width: 60px;
}

.countries_list__title {
  border-left: 1px solid #ccc;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 450px;
  white-space: nowrap;
  color: #A2A0A9;
  margin-left: 15px;

  @media only screen and (min-width: 481px) and (max-width: 1010px) {
    max-width: 40%;
    height: 100%;
    overflow: visible;
    white-space: normal;
  }
  a {
    color: #463F52;
    text-decoration: none;
    font-weight: 300;
    &:hover {
      color: #88aa37;
    }
  }
}

.countries_list__minioverview {
  position: absolute;
  right: 0;
  font-size: 29px;
  line-height: 50px;
  font-weight: 500;
  color: #A2A0A9;

  @media only screen and (max-width: 650px) {
    display: none;
  }

  .loss {
    color: rgba(#C443FF, .5);
  }

  .gain {
    color: rgba(#6D6DE5, .5);
  }

  .bar {
    fill: #FF6699;

    &.extent {
      fill: $cGreen;
    }
  }

  svg {
    float: right;
    margin: 10px;
    width: auto;
  }

  .sibling {
    float: left;
    border-right: 1px solid #ccc;
    width: 20px;

    svg {
      padding-right: 10px;
    }
  }

  .half {
    float: right;
    width: 150px;

    &.last {
      display: none;
      padding-left: 9px;
      border-left: 1px solid #ccc;
      margin-left: 10px;
    }
  }
}

.countries_list__footer {
  background: rgba(#6D6DE5, .15);
  text-align: center;
  padding: 30px 0;

  a {
    display: inline-block;
    border: 2px solid rgba(#464253, .25);
    width: 192px;
    padding: 0 20px;
    font-size: 14px;
    line-height: 38px;
    font-weight: 500;
    text-align: left;
    text-transform: uppercase;
    color: #463F52;
    @include border-radius(21px);

    i {
      float: right;
      display: block;
      height: 38px;
      width: 10px;
      @include country-icons-sprite(overview_footer);
    }

    &:hover {
      border: 2px solid rgba(#464253, .5);
    }
  }
}

// .tooltip {
//   visibility: hidden;
//   position: absolute;
//   z-index: 500;
//   padding: 20px 10px;
//   font-size: 19px;
//   font-weight: 500;
//   text-align: center;
//   color: #C440FF;
//   background: #fff;
//   @include border-radius(5px);
//   @include box-shadow(0 0 3px #000);

//   &:after {
//     content: '';
//     position: absolute;
//     bottom: -6px; left: 50%;
//     border-color: #fff rgba(#fff, 0);
//     border-width: 6px 6px 0 6px;
//     border-style: solid;
//     margin-left: -6px;
//   }

//   &.gain_tooltip,
//   &.tropical_tooltip {
//     color: #6D6DE5;
//   }
//   &.gain_extent_tooltip {
//     color: #97bd3d;
//   }
//   &.subtropical_tooltip {
//     color: #FFFF73;
//   }

//   &.boreal_tooltip {
//     color: #FFB973;
//   }

//   &.temperature_tooltip {
//     color: #73DCFF;
//   }

//   span {
//     display: block;
//     font-size: 15px;
//     line-height: 1.5;
//     color: rgba(#373343, .5);
//   }
// }

.chart {
  display: none;
  position: absolute;
  width: 960px;
  height: 371px;
  color: #fff;

  &.total_loss {
    display: block;
  }

  &.percent_loss,
  &.total_extent {
    .disclaimer {
      bottom: 40px;
    }
  }

  &.total_extent {
    height: 0;
    overflow: hidden;
    .legend {
      top: 40px;
      li:last-child i {
        background: #97bd3d;
      }
    }
  }

  .legend {
    position: absolute;
    z-index: 400;
    top: 10px; left: 20px;

    li {
      font-size: 19px;
      line-height: 1.5;
      @include text-shadow(0 0 5px rgba(#000, .8));

      &:first-child i {
        background: #FF6699;
      }

      &:last-child i {
        background: #6D6DE5;
      }

      i {
        display: inline-block;
        position: relative;
        top: -2px;
        height: 6px;
        width: 6px;
        vertical-align: middle;
        @include border-radius(4px);
      }
    }
  }

  .disclaimer {
    position: absolute;
    z-index: 400;
    left: 20px; bottom: 20px;
    margin: 0;
    font: normal 11px/1 500;
    color: #fff;
  }
}

.ball {
  fill: #6D6DE5;
  @include opacity(.8);
}

.label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  fill: #fff;
}

.axis {
  font-size: 12px;
  font-weight: 500;
  fill: #9D9AA5;
}
.axis_country {
  font-size: 10px;
  font-weight: 500;
  fill: #555;
}
.source_window .conventions .credits {
  margin-bottom: 30px;
}


.overview_button_group {
  position: relative;
  background: #EEEEEE;
  width: 100%;
  &.is-max{
    .inner{
      max-width: 960px;
    }
  }
  .inner {
    width: 100%;
    overflow: hidden;
    padding: 8px;
    .countries_show & {
      width: 790px;
    }
  }
  .share_control, .item, .download-spatial {
    position: relative;
    box-sizing: content-box;
    float: right;
    // display: inline-block;
    padding: 0 24px 0 0;
    margin: 0 0 0 20px;
    font-size: 14px;
    line-height: normal;
    text-transform: uppercase;
    color: $dark;
    cursor: pointer;
    a {
      color: $dark;
      &.disabled {
        opacity: 0.5;
        cursor: default;
      }
    }

    svg{
      display: inline-block;
      position: absolute;
      top: 50%;
      @include transform(translate(0,-50%));
      right: 0px;
      height: 18px;
      width: 18px;
      fill: $dark;
    }

    @include box-sizing(border-box);

    .country-icons-share {
      height: 16px;
      width: 16px;
      display: inline-block;
      vertical-align: bottom;
      margin-left: 5px;
      position: relative;
      top: -4px;
      @include country-icons-sprite(share);
    }

    &:hover {
      border-color: rgba(54,51,64,0.35);
    }
    &.settings {
      &.disable {
        opacity: 0.5;
        background-color: #fafafa;
        pointer-events: none;
      }
      &.no_def {
        svg{
          fill: $cGreen;
        }
      }
    }
    @media only screen and (max-width: 480px) {
      margin: 0 0px 0 20px;
    }
  }

  .share_control {

    @media only screen and (max-width: 480px) {
      margin: 0 20px 0 20px;
    }
    .share {
        position: absolute;
        top: 50%;
        right: 0;
        @include transform-translate(0, -50%);
    }
  }

  .country-share .share_control {
      width: 105px;
      display: block;
      background: none;
      background-color: transparent;
      text-decoration: none;
    }
}
.show-more-countries {
  display: block;
  height: 120px;
  margin: 0 auto;
  .btn {
    position: absolute;
    top: 50%;
    left: 50%;
    @include transform-translate(-50%, -50%);
  }
}



@media only screen and (max-width: 480px) {
  .countries_list {
    max-width: 480px;
    width: 100%;
  }

  .countries_list__header {
    display: none;
  }

  .countries_list__minioverview_number {
    text-align: right;

    &.medium, &.huge, .half {
      display: block;
      width: 95px;
    }

    .half:first-child {
      margin-top: 5px;
    }

    .half, .half.last {
      margin-left: 0;
      float: none;
      font-size: 20px;
      line-height: 1em;
      border: 0;
    }
  }

  .countries_list__num {
    width: 45px;

  }

  .countries_list__num,
  .countries_list__title {
    font-size: 22px;
    border-left: 1px solid #ccc;
  }

  .countries_list__title {
    width: 40%;
    padding-left: 15px;
    white-space: normal;
  }

  .countries_list__data {
    font-size: 12px;
    width: 130px;

    .line {
      min-width: 120px;
      &::after {
        right: 0;
      }
      .gain::after {
        right: 0;
      }
    }
  }

  .overview_graph {
    width: 100%;
  }

  .overview_graph__tabs {
    overflow-x: scroll;
    overflow-y: hidden;

    ul {
      width: 960px;
    }
  }

  .overview_graph__legend {
    padding: 10px;
    font-size: 16px;
    line-height: 25px;

    p {
      font-size: 10px;
      padding: 0 37px 0 0;
    }

    .info {
      display: inline-block;
      top: 20px;
    }
  }

  .overview_graph__title {
    font-size: 26px;
    padding-left: 15px;
    padding-right: 15px;

    sup {
      display: block;
      top: 0;
      margin-top: 5px;
      font-size: 15px;


    }
  }

  .overview_graph__area {
    height: 260px;

    .chart {
      width: 100%;
    }

    .chart.domains {
      height: 200px;
    }

    .legend {
      left: 40px;
    }

    .legend li {
      display: inline-block;
      font-size: 13px;
      margin-right: 20px;
    }

    .disclaimer {
      font-size: 11px;
      bottom: 0;
      margin: 0 10px;
    }

    svg {
      // top: 40px;
    }
  }

  .overview_graph__link {
    height: 50px;
    width: 135px;

    span {
      display: inline;

      &:before { content: " " }
      &:after { content: " " }
    }
  }

  .country-overview-wrapper-coolio {
    top: 0;
  }

  .overview_graph__years {
    border-bottom: 0;

    .year { display: none; }
    .year:first-child,
    .year:last-child {
      display: inherit;
      right: 0;
    }
  }

  .overview_graph .umdoptions_dialog {
    position: fixed;
    top: 0;
    right: auto;
    width: 100%;
    height: 100%;

    ul {
      width: 95%;
    }

    .slider {
      width: 100%;
    }

    p .slider #canopy_slider {
      width: 100%;
      margin-left: 0;
    }
  }

  .source_window {
    top: 0;
    bottom: 0;
  }
}
